﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第六十一题
//BC63 菱形图案
//https://www.nowcoder.com/practice/8b935f8ffe99445dbd42494febd13e45?tpId=107&tqId=33344&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D2%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=


//思路，上半部分看作金字塔，下半部分看作倒装金字塔
#include <stdio.h>

int main() {
    int n = 0;
    while (scanf("%d", &n) != EOF) {
        //打印上半部分
        for (int i = n + 1; i > 0; i--) {
            int j = i;
            //打印空格
            for (j = i - 1; j > 0; j--) {
                printf(" ");
            }
            //打印*
            for (int k = n - i + 2; k > 0; k--) {
                printf("* ");
            }
            printf("\n");
        }
        //打印下半部分
        //控制行数
        for (int i = n; i > 0; i--) {
            int j = i;
            //打印空格
            for (int k = n - i; k >= 0; k--) {
                printf(" ");
            }
            //打印*
            for (j = i; j > 0; j--) {
                printf("* ");
            }
            printf("\n");
        }
    }
    return 0;
}